<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="description" content="慧报考高考志愿测评系统是由长期从事高考志愿指导、教育统计与测量工作的资深专家和教育行业资深软件工程师共同研发，同时提供电脑版、手机版和微信版，主要功能有计划查询、院校查询、专业查询、位次查询、专业测评、智能选校、志愿测评等，系统以大数据为基础为考生提供必要的指导和参考，极大方便考生志愿填报"/>
    <meta name="keywords" content="慧报考,志愿填报,高考志愿测评系统,湖北高考,高考分数,计划查询,院校查询,专业查询,位次查询,专业测评,智能选校,志愿测评,录取查询"/>
    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>慧报考</title>
    <link rel="stylesheet" href="css/main.css" />
    <link rel="stylesheet" href="css/media.css" />
    <link rel="stylesheet" href="css/zszx.css" />
    <link rel="stylesheet" href="css/viewer.css" />
</head>
<style>
    .viewer-toolbar li{
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .viewer-toolbar>li:before {
        margin: 0;
    }
    .viewer-toolbar>.viewer-play:before{
        margin: 0;
    }
</style>
<body>
<div class="header">
    <#include "header.ftl"/>
</div>
<div class="container">
    <div class="container-wrap">
        <div class="nav-title">
            您现在的位置:首页&nbsp;>&nbsp;<span style="color: rgb(241, 150, 39);">往届回顾</span>
        </div>
        <div class="zs-main flex">
            <div class="zs-m-left">
                <div class="lf-tip">
                    <span>招生咨询会</span>
                </div>
                <a href="/line"><div  class="lf-nav-item ">线路安排</div></a>
                <a href="/examination"><div  class="lf-nav-item ">参会报名</div></a>
                <a href="/increment"><div  class="lf-nav-item ">增值服务</div></a>
                <a href="#"> <div class="lf-nav-item active">往届回顾</div></a>
            </div>
            <div class="zs-m-right">
                <div class="rt-title">
                    <span class="rt-nav-title">往届回顾</span>
                    <span class="rt-nav-title-mini">CONSULTATION</span>
                </div>
                <div class="zs-m-rt-content">
                  <div class="zsxc-4 page">
                   <div class="z4-img-list" id="imgViewer">
<#--                    <img  class="z4-img-item" src = "./img/img01.jpg" > </img>-->
<#--                     <img  class="z4-img-item" src = "./img/img01.jpg" > </img>-->
                        <i class="list-i-before">
                        </i><i></i><i></i>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<a class="a-top" href="#" style="display: none"> <span>顶部</span></a>
<div class="footer">
    <#include "footer.ftl"/>
</div>
</body>
</html>
<script src="/js/viewer.js"></script>
<script>
    $('.otto[data-otto="0"]').addClass('active')
    var currentPage = 1
    //获取页面顶部被卷起来的高度
    function scrollTop(){
        return Math.max(
            //chrome
            document.body.scrollTop,
            //firefox/IE
            document.documentElement.scrollTop);
    }
    //获取页面文档的总高度
    function documentHeight(){
//现代浏览器（IE9+和其他浏览器）和IE8的document.body.scrollHeight和document.documentElement.scrollHeight都可以
        return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
    }
    function throttle(fn,time){
        let canUse = true ; // 设置一个开关
        return function(){
            if(!canUse ){ return false } // 如果开关已经关掉了就不用往下了
            // if(canUse) fn.apply(this,arguments)//fn放这里是立即执行
            canUse = false  // 利用闭包刚进来的时候关闭开关
            fn()
            setTimeout(function() {
                canUse = true // 执行完才打开开关
            },time)
        }
    }
    function windowHeight(){
        return (document.compatMode == "CSS1Compat")?
            document.documentElement.clientHeight:
            document.body.clientHeight;
    }
    function addtempdata() {
        $.ajax('api/consultation/webList?page='+currentPage+'&num=15',{
            success:function (res) {
                var data = res.data.rows
                data.forEach(function (item) {
                    $('.list-i-before').before('<div class="zx4-pic-a"   href="'+item+'"><img   data-original="'+item+'"  class="z4-img-item" src = "'+item+'" > </div>')
                })
                $('#imgViewer').viewer({
                    url: 'data-original',
                });
                   currentPage++
                if(res.data.rows.length == 0) {
                   currentPage--
                }
            }
        })
    }

    // $('#jq22').viewer({
    //     url: 'data-original',
    // });
    $(function () {
        var thfn = throttle(addtempdata, 500)
        $(window).on('scroll',function() {
            if(scrollTop()  > 400) {
                $('.a-top').show()
            }else {
                $('.a-top').hide()
            }
            if(scrollTop() + windowHeight() > (documentHeight() / 2 + 400) ){
                thfn()
            }
        });
        addtempdata()
    })
</script>